var base_url="http://"+location.host+"/";
var cookie_list=document.cookie.split(";");
var name="";
cookie_list.forEach(function(v,i){
    if(v.indexOf("cate_name")==1){
        name=v.substr(v.indexOf("=")+1);
    }
});
$("#title").text(name);
$(".book").click(function(res){
    id=$(this).attr("data_id");
    document.cookie="img="+$(this).find("img").attr("src")+";path=/";
    document.cookie="intro="+$(this).find("p").text().replace(/[\s\n\t]+/g,'')+";path=/";
    parent.location.href="/detail/"+id;
});

